package com.study;

import javax.swing.*;

public class JLabelDemo {
    public static void main(String[] args) {
        JFrame jf = new JFrame();
        jf.setTitle("Label");
        jf.setDefaultCloseOperation(3);
        jf.setSize(999,999);
        jf.setLayout(null);
        jf.setLocationRelativeTo(null);
        jf.setAlwaysOnTop(true);

        JLabel jl1 = new JLabel("我是一段文本");
        jl1.setBounds(0,0,99,45);
        jf.add(jl1);

//        JLabel jl2 = new JLabel(new ImageIcon("E:\\LHQ\\study\\Java\\code\\javase\\javase\\day06\\src\\img\\demo.png"));
        JLabel jl2 = new JLabel(new ImageIcon("day06\\src\\img\\demo.png"));
        jl2.setBounds(99,99,500,500);
        jf.add(jl2);

        jf.setVisible(true);
    }
}
